package com.hlcl.huaji.utils;

public class HideUtils {

	//获取内容
	public static String getHideContent(String content) {
		StringBuilder stringBuilder = new StringBuilder("");
		if (content.length() > 6) {
			stringBuilder.append(content.substring(0, 3));
			stringBuilder.append("*****");
			stringBuilder.append(content.substring(content.length() - 3, content.length()));
		}else if(content.length() > 2){
			stringBuilder.append(content.substring(0, 1));
			stringBuilder.append("*****");
			stringBuilder.append(content.substring(content.length() - 1, content.length()));
		}else{
			stringBuilder.append("*****");
		}
		return stringBuilder.toString();
	}

}
